<%@ page language="java" import="com.alibaba.fastjson.JSONObject" pageEncoding="UTF-8" %>
<%@ page import="weaver.conn.RecordSet" %>
<%@ page import="weaver.general.BaseBean" %>
<%@ page import="weaver.general.Util" %>
<%--获取银行信息接口--%>
<%
    BaseBean baseBean = new BaseBean();
    String gysid = Util.null2String(request.getParameter("gysid"));
    String bzwb = Util.null2String(request.getParameter("bzwb"));
    JSONObject dataJson = new JSONObject();
    try {
        RecordSet rs = new RecordSet();
        baseBean.writeLog(">>>>>getGysYhxx_Ajax>>>>>gysid=" + gysid);
        rs.executeQuery("select yxzhdm,yxzh,khyx,ckxj,swiftcode from uf_sapgyszsj_dt1 where mainid=? and kzm='电汇' and yxbz=? and yxqjsrq>=TO_CHAR(SYSDATE, 'YYYY-MM-DD') order by yxqksrq desc", gysid,bzwb);
        if(rs.next()){
            String lxhdh = Util.null2String(rs.getString("yxzhdm"));
            String yxzhdh = Util.null2String(rs.getString("yxzh"));
            String khyxdh = Util.null2String(rs.getString("khyx"));
            String ckxj = Util.null2String(rs.getString("ckxj"));
            String swiftcode = Util.null2String(rs.getString("swiftcode"));
            dataJson.put("lxhdh", lxhdh);
            dataJson.put("yxzhdh", yxzhdh+ckxj);
            dataJson.put("khyxdh", khyxdh);
            dataJson.put("swiftcode", swiftcode);
        }
        rs.executeQuery("select yxzhdm,yxzh,khyx,ckxj,swiftcode from uf_sapgyszsj_dt1 where mainid=? and kzm='承兑' and yxbz=? and yxqjsrq>=TO_CHAR(SYSDATE, 'YYYY-MM-DD') order by yxqksrq desc", gysid,bzwb);
        if(rs.next()){
            String lxhcd = Util.null2String(rs.getString("yxzhdm"));
            String yxzhcd = Util.null2String(rs.getString("yxzh"));
            String khyxcd = Util.null2String(rs.getString("khyx"));
            String ckxj = Util.null2String(rs.getString("ckxj"));
            String swiftcode = Util.null2String(rs.getString("swiftcode"));
            dataJson.put("lxhcd", lxhcd);
            dataJson.put("yxzhcd", yxzhcd+ckxj);
            dataJson.put("khyxcd", khyxcd);
            dataJson.put("swiftcode", swiftcode);
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
    baseBean.writeLog(">>>>>getGysYhxx_Ajax>>>>>dataJson=" + dataJson);
    out.print(dataJson.toJSONString());
%>




